package com.ohuang.myapp.fraction;

import com.ohuang.myapp.ResourceTable;
import ohos.aafwk.ability.fraction.Fraction;
import ohos.aafwk.content.Intent;
import ohos.agp.components.Component;
import ohos.agp.components.ComponentContainer;
import ohos.agp.components.LayoutScatter;

public class PlayerFraction extends Fraction {

    @Override
    protected Component onComponentAttached(LayoutScatter scatter, ComponentContainer container, Intent intent) {
        getFractionAbility().getUITaskDispatcher().asyncDispatch(new Runnable() {
            @Override
            public void run() {
                getFractionAbility().getFractionManager()
                        .startFractionScheduler()
                        .add(ResourceTable.Id_stackLayout2, new Fraction2())
                        .submit();

            }
        });
        return scatter.parse(getXmlId(), container, false);
    }



    protected int getXmlId() {
        return ResourceTable.Layout_fc_test;
    }


    @Override
    protected void onActive() {
        super.onActive();


    }

    @Override
    protected void onComponentDetach() {
        super.onComponentDetach();

    }
}
